<template>
  <div class="com-tab">
    <router-link tag="div" class="tab-item" :to="item.url" v-for="(item, index) in list" :key="index">
      <span class="tab-link">{{item.txt}}</span>
    </router-link>
  </div>
</template>

<script>
  export default {
    name: 'ComTab',
    data() {
      return {
        list: [{
            txt: '推荐',
            url: '/recommend'
          },
          {
            txt: '歌手',
            url: '/singer'
          },
          {
            txt: '排行',
            url: '/rank'
          },
          {
            txt: '搜索',
            url: '/search'
          }
        ]
      }
    }
  }

</script>
